package cn.itcast.bos.web.interceptor;

import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.MethodFilterInterceptor;

import cn.itcast.bos.domain.User;
import cn.itcast.bos.utils.BosGetSesstionUser;

public class BosInterceptor extends MethodFilterInterceptor {

	@Override
	protected String doIntercept(ActionInvocation invocation) throws Exception {
		User user = BosGetSesstionUser.getBosLoginUser();
		if (user ==null) {
			return "login";
		}else {
			return invocation.invoke();
		}
		
	}

}
